package cn.novel.bm.controller.novel;

import cn.novel.bm.domain.novel.Episode;
import cn.novel.bm.util.ResponseResult;
import io.swagger.annotations.*;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import java.util.List;

//@RequestMapping(value = "/episode", produces = MediaType.APPLICATION_JSON_VALUE)
//@RestController
//@Api(tags = "集数管理")
public class EpisodeController {

    @ApiOperation(value = "章节定集", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    @PostMapping(path = "/create", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "novelId", paramType = "formData"),
            @ApiImplicitParam(name = "episodeName", paramType = "formData"),
            @ApiImplicitParam(name = "serialNumber", paramType = "formData"),
            @ApiImplicitParam(name = "paragraphIds", paramType = "formData"),

    })
    public ResponseResult<Void> create(@RequestParam @ApiParam(value = "小说ID") int novelId
            , @RequestParam @ApiParam(value = "集名称") String episodeName
            , @RequestParam @ApiParam(value = "集序号") String serialNumber
            , @RequestParam @ApiParam(value = "段落IDS") String paragraphIds) {
        return new ResponseResult<>();
    }

    @ApiOperation(value = "查询集数列表")
    @GetMapping(path = "/findList")

    public ResponseResult<List<Episode>> findList(@RequestParam int novelId) {
        return new ResponseResult<>();
    }



}
